package com.admin.socketmultiplayer.dialog

import android.content.Context
import kotlinx.android.synthetic.main.dialog_progress.view.*

/**
 * Created by 吴昶 on 2018/4/28.
 */
class ProgressDialog(context: Context,layout:Int,theme:Int):BaseDialog(context, layout,theme){
    override fun initData() {
        this.setCanceledOnTouchOutside(false)

    }

    fun updata(index:String,progress:Int,duration:Int){
        fview.tv_index.text=index
//        fview.tv_progress.text=progress.toString()
//        fview.tv_duration.text=duration.toString()
        fview.pb_s.max=duration
        fview.pb_s.progress=progress
    }

    fun allFinish(){
        var msg="传输完毕，校验数据\n稍后"
        msg=msg.replace("\n","\\n")
        fview.tv_index.text=msg
    }


}